home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / jpi / resoluti.frm < prev    next >
Text File  |  1998-01-29  |  2KB  |  76 lines

  1. VERSION 5.00
  2. Begin VB.Form ResolutionSelectionForm 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Graphics Mode"
  5.    ClientHeight    =   2055
  6.    ClientLeft      =   2745
  7.    ClientTop       =   1605
  8.    ClientWidth     =   2910
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   2055
  13.    ScaleWidth      =   2910
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin VB.CommandButton EnterProgramButton 
  16.       Caption         =   "Enter Game"
  17.       Height          =   255
  18.       Left            =   120
  19.       TabIndex        =   1
  20.       Top             =   1680
  21.       Width           =   1095
  22.    End
  23.    Begin VB.ListBox ResolutionSelectionList 
  24.       Height          =   1425
  25.       Left            =   120
  26.       TabIndex        =   0
  27.       Top             =   120
  28.       Width           =   2655
  29.    End
  30. End
  31. Attribute VB_Name = "ResolutionSelectionForm"
  32. Attribute VB_GlobalNameSpace = False
  33. Attribute VB_Creatable = False
  34. Attribute VB_PredeclaredId = True
  35. Attribute VB_Exposed = False
  36. Private Sub EnterProgramButton_Click()
  37. Call LaunchIt(ResolutionSelectionList.ListIndex)
  38. End Sub
  39. Private Sub Form_Load()
  40. ResolutionSelectionList.AddItem "320x200"
  41. ResolutionSelectionList.AddItem "640x400"
  42. ResolutionSelectionList.AddItem "640x480"
  43. ResolutionSelectionList.AddItem "800x600"
  44. ResolutionSelectionList.ListIndex = 0
  45. End Sub
  46.  
  47. Private Sub ResolutionSelectionList_DblClick()
  48. Call LaunchIt(ResolutionSelectionList.ListIndex)
  49. End Sub
  50.  
  51. Private Sub ResolutionSelectionList_KeyDown(KeyCode As Integer, Shift As Integer)
  52. If KeyCode = KEY_ENTER Then
  53.   Call LaunchIt(ResolutionSelectionList.ListIndex)
  54. End If
  55. End Sub
  56. Private Sub LaunchIt(ResMode)
  57. Select Case ResMode
  58. Case 0
  59.   Call GraphicsEngine.ChangeGraphicsMode(320, 200, 16)
  60.   Unload Me
  61.   Call Main
  62. Case 1
  63.   Call GraphicsEngine.ChangeGraphicsMode(640, 400, 16)
  64.   Unload Me
  65.   Call Main
  66. Case 2
  67.   Call GraphicsEngine.ChangeGraphicsMode(640, 480, 16)
  68.   Unload Me
  69.   Call Main
  70. Case 3
  71.   Call GraphicsEngine.ChangeGraphicsMode(800, 600, 16)
  72.   Unload Me
  73.   Call Main
  74. End Select
  75. End Sub
  76.